﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Checkout.aspx.cs" Inherits="WCSFContrib.ECommerceCatalog.User.Views.Checkout"
    Title="Checkout" MasterPageFile="~/Shared/Default.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Assembly="Microsoft.Practices.Web.UI.WebControls" Namespace="Microsoft.Practices.Web.UI.WebControls"
    TagPrefix="WebControls" %>
    
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" Runat="Server">
	<h1>Checkout</h1>
	<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
	        <asp:Label ID="UserLabel" runat="server" Text="User" /><br />
	        <asp:TextBox ID="UserTextbox" runat="server" Enabled="false" Width="150px" /><br />
	        <asp:Label ID="OrderDateLabel" runat="server" Text="Order Date" /><br />
	        <asp:TextBox ID="OrderDateTextBox" runat="server" Enabled="false" Width="150px" /><br />
            <br />
	        <asp:Label ID="BillingAddressLabel" runat="server" Text="Billing Address" /><br />
	        <asp:GridView ID="BillingAddressGridView" runat="server" DataSourceID="BillingAddressContainerDataSource"
                          AutoGenerateColumns="False" DataKeyNames="AddressId">
	            <Columns>
                    <asp:CommandField ShowSelectButton="True" />
	                <asp:BoundField DataField="AddressId" HeaderText="Id" Visible="False" />
		            <asp:BoundField DataField="Street" HeaderText="Street" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="City" HeaderText="City" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="State" HeaderText="State" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="Country" HeaderText="Country" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="Phone" HeaderText="Phone" >
                        <ItemStyle Width="75px" />
                    </asp:BoundField>
	            </Columns>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <EmptyDataTemplate>
                    Go to the
                    <asp:LinkButton ID="GoToProfileLinkButton1" runat="server" OnClick="GoToProfileLinkButton_Click">User Profile</asp:LinkButton>
                    page for add a address.
                </EmptyDataTemplate>
            </asp:GridView>
            <WebControls:ObjectContainerDataSource ID="BillingAddressContainerDataSource" runat="server"
                DataObjectTypeName="WCSFContrib.ECommerceCatalog.BusinessEntities.Address" />
            <br />
	        <asp:Label ID="ShippingAddressLabel" runat="server" Text="Shipping Address" /><br />
	        <asp:GridView ID="ShippingAddressGridView" runat="server" DataSourceID="ShippingAddressContainerDataSource"
                          AutoGenerateColumns="False" EmptyDataText="No saved addresses." DataKeyNames="AddressId">
	            <Columns>
                    <asp:CommandField ShowSelectButton="True" />
	                <asp:BoundField DataField="AddressId" HeaderText="Id" Visible="False" />
		            <asp:BoundField DataField="Street" HeaderText="Street" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="City" HeaderText="City" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="State" HeaderText="State" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="Country" HeaderText="Country" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="Phone" HeaderText="Phone" >
                        <ItemStyle Width="75px" />
                    </asp:BoundField>
	            </Columns>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <EmptyDataTemplate>
                    Go to the
                    <asp:LinkButton ID="GoToProfileLinkButton2" runat="server" OnClick="GoToProfileLinkButton_Click">User Profile</asp:LinkButton>
                    page for add a address.
                </EmptyDataTemplate>
            </asp:GridView>
            <WebControls:ObjectContainerDataSource ID="ShippingAddressContainerDataSource" runat="server"
                DataObjectTypeName="WCSFContrib.ECommerceCatalog.BusinessEntities.Address" />
            <br />
	        <asp:Label ID="PaymentTypeLabel" runat="server" Text="Payment Type" /><br />
            <asp:GridView ID="PaymentTypeGridView" DataSourceID="PaymentsObjectContainerDataSource" runat="server" AutoGenerateColumns="False"
	            EmptyDataText="No saved payment methods." DataKeyNames="PaymentId">
	            <Columns>
                    <asp:CommandField ShowSelectButton="True" />
	                <asp:BoundField DataField="PaymentId" HeaderText="Id" Visible="False" />
		            <asp:BoundField DataField="PaymentType" HeaderText="Payment Type" >
                        <ItemStyle Width="100px" />
                    </asp:BoundField>
		            <asp:BoundField DataField="PaymentInfo" HeaderText="Payment Information" >
                        <ItemStyle Width="300px" />
                    </asp:BoundField>
	            </Columns>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                <EmptyDataTemplate>
                    Go to the
                    <asp:LinkButton ID="GoToProfileLinkButton3" runat="server" OnClick="GoToProfileLinkButton_Click">User Profile</asp:LinkButton>
                    page for add a payment method.
                </EmptyDataTemplate>
            </asp:GridView>
            <WebControls:ObjectContainerDataSource ID="PaymentsObjectContainerDataSource" runat="server"
                DataObjectTypeName="WCSFContrib.ECommerceCatalog.BusinessEntities.Payment" />
	        <br />
	        <asp:Button ID="CompleteCheckoutButton" runat="server" Text="Submit Order" OnClick="CompleteCheckoutButton_Click" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
